/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sunspotworld.protocols;

import com.sun.spot.peripheral.radio.LowPan;
import com.sun.spot.peripheral.radio.mhrp.aodv.Constants;

/**
 *
 * @author me
 */
public class MyProtocols {
    public static final byte DATA_TRANSFER = (byte)201;
    public static final byte ADVERTISEMENT = (byte)202;
    public static final byte BID = (byte)203;
    public static final byte BEACON = (byte)204;
    public static final byte AWARD = (byte)205;
    public static final byte TIME = (byte)206;
    public static final byte POLL = (byte)207;
    
    public static void registerMyProtocols() {
        LowPan.getInstance().deregisterProtocol(Constants.AODV_PROTOCOL_NUMBER);
        LowPan.getInstance().registerProtocol(DATA_TRANSFER, new DataTransferProtocol());
        LowPan.getInstance().registerProtocol(ADVERTISEMENT, new AdvertisementProtocol());
        LowPan.getInstance().registerProtocol(BID, new BidProtocol());
        LowPan.getInstance().registerProtocol(BEACON, new BeaconProtocol());
        LowPan.getInstance().registerProtocol(AWARD, new AwardProtocol());
        LowPan.getInstance().registerProtocol(TIME, new TimeProtocol());
        LowPan.getInstance().registerProtocol(POLL, new DataPollProtocol());
    }
}
